<input type="hidden" name="users" value="<?php echo $userid; ?>"/>
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Sonsie+One' rel='stylesheet' type='text/css'>
<style type="text/css">
input[type=text]{	
	border:none;	
	}
</style>
<div class="row-fluid">
<div class="span2">
<img class="img-polaroid" width="150" height="170" src="<?= $this->config->base_url(); ?>assets/uploads/<?=$user['profile_image']?>" />

</div>
<div class="span3">
	<input type="hidden" name="user" value="<?php echo ucfirst($this->common_model->get_username_id($userid));?>" readonly /><h4><?php echo ucfirst($this->common_model->get_username_id($userid));?></h4><br>
	<?php foreach ($designationbyid as $deg):?>
		<h5 style="margin-top: -20px;"><?php echo $deg->name;?></h5>
		<?php endforeach?>
</div>

<div class="span4">
<?php echo form_open('user/wallpage/thanks/')?>
<input type="hidden" name="users" value="<?php echo $userid; ?>"/>
<input type="submit" class="btn btn-success" value="Thanks"/><br><br>
</form>
<?php echo form_open('user/wallpage/follow/')?>
	<input type="hidden" name="users" value="<?php echo $userid; ?>"/>
	<input type="submit" name="follow" class="btn btn-info" value="Follow"/>
	</form>
</div>

<div class="span1">
 <?php foreach($coffeebyid as $coffee):?>
  <?php	$cups=$coffee->cups; ?>
	<?php endforeach;?>
<?php
if(!empty($cups)){
$cupimage='<img src="'.base_url().'assets/img/cup.png" >';
for($i=0;$i<$cups; $i++)
{
	echo $cupimage;
}
 }?>
 
</div>
<div class="span2">
	Coffee&nbsp;
		
	 <?php foreach($coffeebyid as $coffee):?>
  <b><?php  echo $coffee->cups; ?></b>
	<?php endforeach;?>&nbsp; per day<br>
	<?php foreach($coffeebyid as $coffee):?>
  <?php	$milk=$coffee->milk;
        if($milk==1)
		{
			echo "<b>more</b>";
		}else{
			echo "<b>less</b>";
		}
  
   ?>&nbsp; MILK
	<?php endforeach;?><br>
	<?php foreach($coffeebyid as $coffee):?>
  <?php	$sugar=$coffee->sugar;
         if($sugar==1)
		{
			echo "<b>more</b>";
		}else{
			echo "<b>less</b>";
		}
  
   ?>&nbsp; SUGAR
	<?php endforeach;?>

</div>

</div>
<br />
<br />

<div class="row-fluid">
	<div class="span8">
	<?php if($this->session->flashdata('msg')): ?>
<div class="alert alert-success" ><?php echo $this->session->flashdata('msg')?></div>
<?php endif;?>
<?php include('application/views/common/tabs.php'); ?>

<?php echo form_open('user/wallpage/wallpost/')?>
<input type="hidden" name="users" value="<?php echo $userid; ?>"/>
<textarea name="content" placeholder="Post on <?php echo ucfirst($this->common_model->get_username_id($userid));?>'s wall..." style="width:550px; resize:none;"></textarea><br>
<input  type="submit" value="post" class="btn btn-success"/>
</form>
<br><br>

<?php foreach($userpost as $userfrom):?>
<div style="width: 550px;">
	
	<div style="width: 50px; height:70px;float: left;margin-top: 30px;">
		<img class="img-polaroid" width="60" height="80" src="<?= $this->config->base_url(); ?>assets/uploads/<?php echo $userfrom->profile_image;?>" />
	</div>
	<div style="width: 470px; height:80px;  float: left; margin-left: 20px;margin-top: 30px;">
		<div style="float: left"><b><?php echo $userfrom->username;?></b></div>
		<div style="float: right"><?php $date = $userfrom->date; $ts = strtotime($date); echo date('d M Y', $ts); ?></div><br>
		<?php echo $userfrom->content;?>
		<br>
		<a href="<?php echo site_url('user/wallpage/delete_wallpost').'/'.$userfrom->wallpostid?>"><i class="icon-trash"></i></a>
	</div>
	
</div>
<?php endforeach;?>


	</div>
	<div class="span4">
		 <script>
    //tooltip
    $(function() {
    var tooltips = $( "[title]" ).tooltip();
    $(document)(function() {
    tooltips.tooltip( "open" );
    })
    });
</script>
	<a style="font-family: 'Roboto Slab', serif;font-weight: 700; font-size: 12px;">
		Badges:
		</a>
		<?php if(!empty($badgesidarray)){?>
		<img src="<?= $this->config->base_url(); ?>assets/images/badges/<?php echo $badgesidarray[0]['image'];?>" title="<?php echo $badgesidarray[0]['name'];?> : <?php echo $badgesidarray[0]['description'];?>"> 
		<img src="<?= $this->config->base_url(); ?>assets/images/badges/<?php echo $badgesidarray[1]['image'];?>" title="<?php echo $badgesidarray[1]['name'];?> : <?php echo $badgesidarray[1]['description'];?>"> 
		<img src="<?= $this->config->base_url(); ?>assets/images/badges/<?php echo $badgesidarray[2]['image'];?>" title="<?php echo $badgesidarray[2]['name'];?> : <?php echo $badgesidarray[2]['description'];?>"> 
		<?php } ?>
		<a data-toggle="modal" href="#windowTitleDialog"  style="margin-bottom: 30px;">See All...</a>
		<br><br><br><br>
		<a style="font-family: 'Roboto Slab', serif;font-weight: 700; font-size: 12px;">
		Thanks Received:
		</a>
			<a style="font-family: 'Roboto Slab', serif;font-weight: 400; color:#666; font-size: 32px;">
<!--		<?php foreach($thanksreceived as $thank){
  	 			$b=$thank->thank;
	 			$a=(string)$b.'\n';
				
	 			 
	 	}echo strlen($a);
		 ?>-->
		 
		 <?php 
$items = array();
$count = 0;
foreach($number_of_thanks as $i => $thank) { 
 $items[$count++] = $thank; 
} 
if(!empty($i)){
print_r($i+1); 
}else{
	echo "0";
}
?>
		 
		 </a>
	
		 
	 
		
  <img src="<?= $this->config->base_url(); ?>assets/images/badges/thanks.png"  />
	
	<a data-toggle="modal" href="#windowTitleDialog2"  style="margin-bottom: 30px;">from...</a>
	
		<br><br><br><br>
		<a style="font-family: 'Roboto Slab', serif;font-weight: 700; font-size: 12px;">
		Stars Earned: &nbsp;&nbsp;
		</a>
			<a style="font-family: 'Roboto Slab', serif;font-weight: 400; color:#666; font-size: 32px;">
<!--			<?php foreach($starsreceived as $star):?>
  	 <?php $b=$star->star;?>
	<?php endforeach;?>
	 	 <?php $a='$b'; echo strlen($a);?>-->
		 		 <?php 
$items = array();
$count = 0;
foreach($number_of_stars as $i => $star) { 
 $items[$count++] = $star; 
} 
if (!empty($i)){
	print_r($i+1); 
	}else{
		echo "0";
	}
?>
		 
		 </a>
		<img style="margin-top: -20px;" src="<?= $this->config->base_url(); ?>assets/images/star.png"/>

		<br><br><br><br>
		<a style="font-family: 'Roboto Slab', serif;font-weight: 700; font-size: 12px;">
		Followers:
		</a>
		<img class="img-polaroid" width="60" height="80" src="<?= $this->config->base_url(); ?>assets/uploads/<?php
		if(!empty($followersarray))
		{
			echo $followersarray[0]['profile_image'];
		}
		?>" title="<?php 
		if(!empty($followersarray))
		{
		echo $followersarray[0]['username'];
		}
		?> "> 

	<a data-toggle="modal" href="#windowTitleDialog1"  style="margin-bottom: 30px;">View All...</a>
	</div>
</div>








<script>
			$(document).ready(function() {
				$('#windowTitleDialog').bind('show', function () {
					document.getElementById ("xlInput").value = document.title;
					});
				});
			function closeDialog () {
				$('#windowTitleDialog').modal('hide'); 
				};
			function okClicked () {
				document.title = document.getElementById ("xlInput").value;
				closeDialog ();
				};
			</script>
<div id="windowTitleDialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="windowTitleLabel" aria-hidden="true">
				<div class="modal-header">
					<a href="#" class="close" data-dismiss="modal">&times;</a>
					<h3>Badges Earned</h3>
					</div>
				<div class="modal-body">
					<div class="divDialogElements">
						<input class="xlarge" id="xlInput" name="xlInput" type="hidden" />
						<?php echo form_open('founder/wallpage/assign_badges/')?>
<input type="hidden" name="users" value="<?php echo $userid; ?>"/>
		<div style="margin-left: 70px;">
		<?php foreach($badgesid as $row):?>
		<a href="#" rel="tooltip" data-placement="top" title="<?php echo $row->name;?> : <?php echo $row->description;?>">
		<img src="<?= $this->config->base_url(); ?>assets/images/badges/<?php echo $row->image;?>"> 
		</a>
	  	<?php endforeach; ?></div>
				

					</div>
					</div>
				<div class="modal-footer">
					<a href="#" data-dismiss="modal" class="btn btn-success" id="1" onclick="closeDialog();">Close</a>
					</form>
					</div>
				</div>





<script>
			$(document).ready(function() {
				$('#windowTitleDialog1').bind('show', function () {
					document.getElementById ("xlInput1").value = document.title;
					});
				});
			function closeDialog () {
				$('#windowTitleDialog1').modal('hide'); 
				};
			function okClicked () {
				document.title = document.getElementById ("xlInput1").value;
				closeDialog ();
				};
			</script>
<div id="windowTitleDialog1" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="windowTitleLabel" aria-hidden="true">
				<div class="modal-header">
					<a href="#" class="close" data-dismiss="modal">&times;</a>
					<h3>Followers</h3>
					</div>
				<div class="modal-body">
					<div class="divDialogElements">
						<input class="xlarge" id="xlInput1" name="xlInput1" type="hidden" />
						<?php echo form_open('founder/wallpage/assign_badges/')?>
<input type="hidden" name="users" value="<?php echo $userid; ?>"/>
				<div style="margin-left: 70px; margin-top: 20px;">
				<?php foreach($followers as $follow):?>
  <img class="img-polaroid" width="60" height="80" src="<?= $this->config->base_url(); ?>assets/uploads/<?php echo $follow->profile_image;?>" title=" <?php	echo $follow->username; ?>" />
	<?php endforeach;?>
				</div>

						</div>
					</div>
				<div class="modal-footer">
					<a href="#" data-dismiss="modal" class="btn btn-success" onclick="closeDialog();">Close</a>
					</form>
					</div>
				</div>
				
				
				
				
<script>
			$(document).ready(function() {
				$('#windowTitleDialog2').bind('show', function () {
					document.getElementById ("xlInput2").value = document.title;
					});
				});
			function closeDialog () {
				$('#windowTitleDialog2').modal('hide'); 
				};
			function okClicked () {
				document.title = document.getElementById ("xlInput2").value;
				closeDialog ();
				};
			</script>
<div id="windowTitleDialog2" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="windowTitleLabel" aria-hidden="true">
				<div class="modal-header">
					<a href="#" class="close" data-dismiss="modal">&times;</a>
					<h3>Thanks Received</h3>
					</div>
				<div class="modal-body">
					<div class="divDialogElements">
						<input class="xlarge" id="xlInput2" name="xlInput2" type="hidden" />
						<?php echo form_open('founder/wallpage/assign_badges/')?>
<input type="hidden" name="users" value="<?php echo $userid; ?>"/>
				<div style="margin-left: 50px; margin-top: 30px;">
				<?php foreach($thanksreceived as $thank):?>
  <img src="<?= $this->config->base_url(); ?>assets/images/badges/thanks.png" title=" <?php	echo $thank->username; ?>" />
	<?php endforeach;?>
				</div>

						</div>
					</div>
				<div class="modal-footer">
					<a href="#" data-dismiss="modal" class="btn btn-success" onclick="closeDialog();">Close</a>
					</form>
					</div>
				</div>
				
				
